CommandRotate Class Reference

#include <CommandRotate.h>

Inheritance diagram for CommandRotate:

Command List of all members.

Public Member Functions

 CommandRotate (float angle, OSGWindows *osgwind)
 CommandRotate (float angle, OSGWindows *osgwind, TraffEduObject *obj)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
vector< TraffEduObject * > rotatedObjs_
float angle_
int rightCLK
TraffEduObject * obj_

Detailed Description

Definition at line 7 of file CommandRotate.h.


Constructor & Destructor Documentation

CommandRotate::CommandRotate (  float  angle,
OSGWindows *  osgwind
) 
 

A constructor. Initializes osgwind_ and rightCLK variables. It is called if the rotation operation is done from the menubar.

Parameters:
angle an float argument.
osgwind an OSGWindows pointer.

Definition at line 2 of file CommandRotate.cpp.

References angle_, OSGWindows::getSelectedObjects(), osgwind, osgwind_, rightCLK, and rotatedObjs_.

CommandRotate::CommandRotate (  float  angle,
OSGWindows *  osgwind,
TraffEduObject *  obj
) 
 

A constructor. Initializes osgwind_, obj_, and rightCLK variables. It is called if the rotation operation is done from the menubar.

Parameters:
angle an float argument.
osgwind an OSGWindows pointer.
obj a TraffEduObject pointer.

Definition at line 10 of file CommandRotate.cpp.

References angle_, obj_, osgwind, osgwind_, rightCLK, and rotatedObjs_.


Member Function Documentation

bool CommandRotate::execute (   )  [virtual]
 

do the rotation operation.

Returns:
Operation success

Implements Command.

Definition at line 20 of file CommandRotate.cpp.

References angle_, and rotatedObjs_.

bool CommandRotate::unexecute (   )  [virtual]
 

undo the rotation operation.

Returns:
Operation success

Implements Command.

Definition at line 32 of file CommandRotate.cpp.

References angle_, and rotatedObjs_.


Member Data Documentation

float CommandRotate::angle_ [private]
 

a private variable. It shows how much the selected objects are rotated.

Definition at line 27 of file CommandRotate.h.

Referenced by CommandRotate(), execute(), and unexecute().

TraffEduObject* CommandRotate::obj_ [private]
 

a private variable. It is used to hold the rotated object.

Definition at line 39 of file CommandRotate.h.

Referenced by CommandRotate().

OSGWindows* CommandRotate::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 15 of file CommandRotate.h.

Referenced by CommandRotate().

int CommandRotate::rightCLK [private]
 

a private variable. It shows if the CommandRotate is called from the RightClickMenu or not.

Definition at line 33 of file CommandRotate.h.

Referenced by CommandRotate().

vector<TraffEduObject*> CommandRotate::rotatedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the rotated objects.

Definition at line 21 of file CommandRotate.h.

Referenced by CommandRotate(), execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO